<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/iconfont3.css">
		<style type="text/css">
			
			
			
			.mui-page-content {
				position: absolute;
				left: 0;
				right: 0;
				top: 18px;
				bottom: 0;
				width: 100%;
				height: 100%;
				background-color: #efeff4;
			}
			 .oa-contact-cell.mui-table .mui-table-cell {
				padding: 11px 0;
				vertical-align: middle;
			}
			
			.oa-contact-cell {
				position: relative;
				margin: -11px 0;
			}
	
			.oa-contact-avatar {
				width: 75px;
			}
			.oa-contact-avatar img {
				border-radius: 50%;
			}
			.oa-contact-content {
				width: 100%;
			}
			.oa-contact-name {
				margin-right: 20px;
			}
			.oa-contact-name, .oa-contact-position {
				float: left;
			}
			
			
		</style>
	</head>
	
<body class="mui-fullscreen" >
		<!--    企业列表       -->
		
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<a href="organize.html" class="mui-left mui-btn  mui-btn-link mui-btn-nav mui-pull-left">
					<span class="mui-icon mui-icon-left-nav"></span>
				</a>
				
				<h1 class="mui-center mui-title">企业列表</h1>
				<!--<button type="button" class="mui-right mui-btn  mui-btn-link mui-btn-nav mui-pull-right">
					<a href="NewQiye.html" class="mui-icon mui-icon-plusempty"></a>
				</button>-->
			</div>
			<div class="mui-page-content" style="margin-top: 30px;">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul id="ulId"  class="mui-table-view mui-table-view-chevron">
							
						</ul>
					</div>
				</div>
			</div>
		</div>
		
		
		<script src="js/mui.min.js "></script>
		<script src="js/mui.view.js "></script>
	
		<script src="js/jquery-3.2.1.min.js"></script>
		
		<script type="text/javascript">
			mui.init();
			//初始化
			var id=localStorage.getItem("employeeid");
			//console.log(id);
 		mui.plusReady(function() {
				getCompanyList();
			});
			
		function getCompanyList(){
				var network = true;
				if(mui.os.plus) {
					mui.plusReady(function() {
						if(plus.networkinfo.getCurrentType() == plus.networkinfo.CONNECTION_NONE) {
							network = false;
						}
					});
				}
				if(network) {
						console.log('网络正常,正在发送请求...');
							 mui.ajax({
                                    url:'http://113.71.26.27:8080/tpl/phone/getAllCompany',
                                    async:true,
     								type:'post',
     								data:{
     									id:id
     								},
     							 	success:function(data){
     							 		var com='';
       									for(var i=0;i<data.length;i++){
       									 var mystime = new Date(data[i].time).toLocaleDateString();
       										com+="<li class='mui-table-view-cell'>"+
       												"<a href='qiye-detail.html' class='mui-navigate-right'>"+
													"<span class='mui-tab-label mui-slider-handle mui-icon mui-icon-home' style='font-size: 18px;'>"+data[i].name+"</span></a>"+       
						 						 "</li>"
       										}
       									
       									$('#ulId').append(com);
     								}
     							})
					} else {
						mui.toast("当前网络不给力，请稍后再试...");
				}

			}	
			
			
			
			
			
		/**
		 * 重写返回事件
		 */
		mui.back = function(){
			
			window.location.href = "organize.html";
		}
		
	</script>
	</body>

</html>